package com.wp.service;

import com.wp.dao.PersonDao;
import com.wp.domain.Person;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service("personService")
public class PersonServiceImpl implements PersonService{

    @Resource
    private PersonDao personDao;

    public List<Person> findAll() {
        return personDao.findAll();
    }

    public Person findById(Integer id) {
        return personDao.findById(id);
    }

    public int add(Person person) {
        return personDao.add(person);
    }

    public int del(Integer id) {
        return personDao.del(id);
    }

    public int upd(Person person) {
        return personDao.upd(person);
    }
}
